Technical Q&As
QD3D 70 - Finding The Center Of A Model (11-July-97)
Q
How can I find the center of a model, so I can position the camera to completely display
the model (much like the 'home' camera position in the Simple Viewer)?
A
Use the Q3View_StartBoundingBox
and Q3View_EndBoundingBox
routines to compute an object's bounding box. Next, use the data in the
TQ3BoundingBox
structure returned
by Q3View_EndBoundingBox
to compute the center of the object.
-- Scott Kuechle
Worldwide Developer Technical Support
Technical Q&As
Previous Question | Contents |
Next Question
To contact us, please use the Contact Us page.